<?php
        	include "thuvien/db.php";
            include "thuvien/error.php";
?>



<?php
	$mahs = $_REQUEST["MaSo"];
	$hoten= $_REQUEST["Ten"];
	$diachi = $_REQUEST["DiaChi"];
	$dienthoai = $_REQUEST["DienThoai"];
	$ngaysinh = $_REQUEST["NgaySinh"];
	
	

	$cnn = mysql_connect( $hostName, $username, $password );
	if ( ! $cnn )
		showError();
             
    $dbselect = mysql_select_db( $databaseName);
    if(!$dbselect)
      	showError();            
			
				
	$table = "hocsinh";
	$query = "INSERT INTO $table VALUES ('$mahs', '$hoten', '$diachi', '$dienthoai', '$ngaysinh')";
	$result = mysql_query($query, $cnn);
	
	if (mysql_affected_rows())
	{
		echo "1";
	}
	else
	{
		echo "0";
	}

	
?>